import java.util.ArrayList;
import java.util.List;

public class Solution1447 {
    public List<String> simplifiedFractions(int n) {
        List<String> ans=new ArrayList<>();
        for (int i=2;i<=n;i++){
            for (int j=1;j<i;j++){
                if (gcd(i, j) == 1) {
                    StringBuilder stringBuilder=new StringBuilder();
                    stringBuilder.append(j).append('/').append(i);
                    ans.add(stringBuilder.toString());
                }
            }
        }
        return ans;
    }

    int gcd(int a,int b){
        if (a%b==0){
            return b;
        }else{
            return gcd(b,a % b);
        }
    }

    public static void main(String[] args) {
        System.out.println(new Solution1447().simplifiedFractions(4));
    }
}
